using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter03
{
	/// <summary>
	/// Example03: The Sum of Two Vectors
	/// Find the sum of two vectors A and B lying in the xy plane 
	/// and given by A = (2.0i + 2.0j) m and B = (2.0i - 4.0j) m
	/// </summary>
	public class Example03
	{
		public Example03()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			L.Vector A = new L.Vector();
			A.X = 2.0;
			A.Y = 2.0;
			L.Vector B = new L.Vector();
			B.X = 2.0;
			B.Y = -4.0;
			L.Vector sum = A + B;
            result=Convert.ToString(sum.X)+" i "+
				Convert.ToString(sum.Y)+"  j  ";
		}
	}
}
